namespace Agro.Models {
        using System;
        using SN.Data;
        
        
        /// <summary>
        /// 表名：T_User_Role 主键列：UR_UserID,UR_RoleID
        /// </summary>
        [SerializableAttribute()]
        public partial class T_User_Role : Entity {
            
            protected Int32 _UR_UserID;
            
            protected Int32 _UR_RoleID;
            
            protected String _UR_Status;
            
            protected String _UR_CreateUserID;
            
            protected String _UR_CreateDate;
            
            protected String _UR_CreateIP;
            
            /// <summary>
            /// 用户表中的ID
            /// </summary>
            public Int32 UR_UserID {
                get {
                    return this._UR_UserID;
                }
                set {
                    this.OnPropertyValueChange(_.UR_UserID, _UR_UserID, value);
                    this._UR_UserID = value;
                }
            }
            
            /// <summary>
            /// 角色表中的ID
            /// </summary>
            public Int32 UR_RoleID {
                get {
                    return this._UR_RoleID;
                }
                set {
                    this.OnPropertyValueChange(_.UR_RoleID, _UR_RoleID, value);
                    this._UR_RoleID = value;
                }
            }
            
            /// <summary>
            /// 1有效   0无效
            /// </summary>
            public String UR_Status {
                get {
                    return this._UR_Status;
                }
                set {
                    this.OnPropertyValueChange(_.UR_Status, _UR_Status, value);
                    this._UR_Status = value;
                }
            }
            
            /// <summary>
            /// 创建人员
            /// </summary>
            public String UR_CreateUserID {
                get {
                    return this._UR_CreateUserID;
                }
                set {
                    this.OnPropertyValueChange(_.UR_CreateUserID, _UR_CreateUserID, value);
                    this._UR_CreateUserID = value;
                }
            }
            
            /// <summary>
            /// 创建时间
            /// </summary>
            public String UR_CreateDate {
                get {
                    return this._UR_CreateDate;
                }
                set {
                    this.OnPropertyValueChange(_.UR_CreateDate, _UR_CreateDate, value);
                    this._UR_CreateDate = value;
                }
            }
            
            /// <summary>
            /// 创建IP
            /// </summary>
            public String UR_CreateIP {
                get {
                    return this._UR_CreateIP;
                }
                set {
                    this.OnPropertyValueChange(_.UR_CreateIP, _UR_CreateIP, value);
                    this._UR_CreateIP = value;
                }
            }
            
            /// <summary>
            /// 获取实体对应的表名
            /// </summary>
            protected override Table GetTable() {
                return new Table<T_User_Role>("T_User_Role");
            }
            
            /// <summary>
            /// 获取实体中的主键列
            /// </summary>
            protected override Field[] GetPrimaryKeyFields() {
                return new Field[] {
                        _.UR_UserID,
                        _.UR_RoleID};
            }
            
            /// <summary>
            /// 获取列信息
            /// </summary>
            protected override Field[] GetFields() {
                return new Field[] {
                        _.UR_UserID,
                        _.UR_RoleID,
                        _.UR_Status,
                        _.UR_CreateUserID,
                        _.UR_CreateDate,
                        _.UR_CreateIP};
            }
            
            /// <summary>
            /// 获取列数据
            /// </summary>
            protected override object[] GetValues() {
                return new object[] {
                        this._UR_UserID,
                        this._UR_RoleID,
                        this._UR_Status,
                        this._UR_CreateUserID,
                        this._UR_CreateDate,
                        this._UR_CreateIP};
            }
            
            /// <summary>
            /// 给当前实体赋值
            /// </summary>
            protected override void SetValues(IRowReader reader) {
                if ((false == reader.IsDBNull(_.UR_UserID))) {
                    this._UR_UserID = reader.GetInt32(_.UR_UserID);
                }
                if ((false == reader.IsDBNull(_.UR_RoleID))) {
                    this._UR_RoleID = reader.GetInt32(_.UR_RoleID);
                }
                if ((false == reader.IsDBNull(_.UR_Status))) {
                    this._UR_Status = reader.GetString(_.UR_Status);
                }
                if ((false == reader.IsDBNull(_.UR_CreateUserID))) {
                    this._UR_CreateUserID = reader.GetString(_.UR_CreateUserID);
                }
                if ((false == reader.IsDBNull(_.UR_CreateDate))) {
                    this._UR_CreateDate = reader.GetString(_.UR_CreateDate);
                }
                if ((false == reader.IsDBNull(_.UR_CreateIP))) {
                    this._UR_CreateIP = reader.GetString(_.UR_CreateIP);
                }
            }
            
            public override int GetHashCode() {
                return base.GetHashCode();
            }
            
            public override bool Equals(object obj) {
                if ((obj == null)) {
                    return false;
                }
                if ((false == typeof(T_User_Role).IsAssignableFrom(obj.GetType()))) {
                    return false;
                }
                if ((((object)(this)) == ((object)(obj)))) {
                    return true;
                }
                return false;
            }
            
            public class _ {
                
                /// <summary>
                /// 表示选择所有列，与*等同
                /// </summary>
                public static AllField All = new AllField<T_User_Role>();
                
                /// <summary>
                /// 用户表中的ID - 字段名：UR_UserID - 数据类型：Int32
                /// </summary>
                public static Field UR_UserID = new Field<T_User_Role>("UR_UserID");
                
                /// <summary>
                /// 角色表中的ID - 字段名：UR_RoleID - 数据类型：Int32
                /// </summary>
                public static Field UR_RoleID = new Field<T_User_Role>("UR_RoleID");
                
                /// <summary>
                /// 1有效   0无效 - 字段名：UR_Status - 数据类型：String
                /// </summary>
                public static Field UR_Status = new Field<T_User_Role>("UR_Status");
                
                /// <summary>
                /// 创建人员 - 字段名：UR_CreateUserID - 数据类型：String
                /// </summary>
                public static Field UR_CreateUserID = new Field<T_User_Role>("UR_CreateUserID");
                
                /// <summary>
                /// 创建时间 - 字段名：UR_CreateDate - 数据类型：String
                /// </summary>
                public static Field UR_CreateDate = new Field<T_User_Role>("UR_CreateDate");
                
                /// <summary>
                /// 创建IP - 字段名：UR_CreateIP - 数据类型：String
                /// </summary>
                public static Field UR_CreateIP = new Field<T_User_Role>("UR_CreateIP");
            }
        }
    }
    